package com.example.foobar.business.service.impl;

import com.example.foobar.business.service.DidiCompanyService;
import com.example.foobar.business.service.DidiPromotionService;
import com.example.foobar.dao.service.DidiPromotionDaoService;
import com.example.foobar.entity.DidiPromotion;
import com.example.foobar.param.DidiPromotionPageParam;
import io.geekidea.springbootplus.framework.core.pagination.Paging;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 分析系统配置文件 服务实现类
 *
 * @author 郑英奔
 * @since 2021-05-31
 */
@Slf4j
@Service
public class DidiPromotionServiceImpl implements DidiPromotionService {

    @Autowired
    DidiPromotionDaoService didiPromotionDaoService;

    @Override
    public boolean saveDidiPromotion(DidiPromotion didiPromotion) throws Exception {
        return didiPromotionDaoService.saveDidiPromotion(didiPromotion);
    }

    @Override
    public boolean updateDidiPromotion(DidiPromotion didiPromotion) throws Exception {
        return didiPromotionDaoService.updateDidiPromotion(didiPromotion);
    }

    @Override
    public boolean deleteDidiPromotion(Long id) throws Exception {
        return didiPromotionDaoService.deleteDidiPromotion(id);
    }

    @Override
    public DidiPromotion getById(Long id) {
        return null;
    }

    @Override
    public Paging<DidiPromotion> getDidiPromotionPageList(DidiPromotionPageParam didiPromotionPageParam) throws Exception {
        return didiPromotionDaoService.getDidiPromotionPageList(didiPromotionPageParam);
    }

    @Override
    public List<DidiPromotion> getList() {
        return didiPromotionDaoService.list();
    }
}
